import express from 'express'
import { work } from '../services/user.service.js'
const router = express.Router()
router.get('/', function (req, res, next) {
    res.send('respond with a resource');
});

router.get('/list', function (req, res, next) {
    res.json([
        { id: 1, name: 'aaa' },
        { id: 2, name: 'bbb' },
        { id: 3, name: 'ccc' },
    ]);
    console.log("users/list router")
});

router.get('/work',async (req, res, next) => {
    console.log("aaaaa")
    let aaa=await work('do smoething')
    console.log("bbbbb")
    res.send(aaa)
})
export default router